package ink.yql.model;

import java.io.Serializable;

/**
 * @author YQL
 */
public class TeamUser implements Serializable {
    /**
     * 项目id
     */
    private  Integer tid;
    /**
     * 团队id
     */
    private  Integer pid;

    public TeamUser(Integer tid, Integer pid) {
        this.tid = tid;
        this.pid = pid;
    }

    public TeamUser() {
    }

    public static TeamUserBuilder builder() {
        return new TeamUserBuilder();
    }

    public Integer getTid() {
        return this.tid;
    }

    public Integer getPid() {
        return this.pid;
    }

    public void setTid(Integer tid) {
        this.tid = tid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof TeamUser)) return false;
        final TeamUser other = (TeamUser) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$tid = this.getTid();
        final Object other$tid = other.getTid();
        if (this$tid == null ? other$tid != null : !this$tid.equals(other$tid)) return false;
        final Object this$pid = this.getPid();
        final Object other$pid = other.getPid();
        if (this$pid == null ? other$pid != null : !this$pid.equals(other$pid)) return false;
        return true;
    }

    protected boolean canEqual(final Object other) {
        return other instanceof TeamUser;
    }

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $tid = this.getTid();
        result = result * PRIME + ($tid == null ? 43 : $tid.hashCode());
        final Object $pid = this.getPid();
        result = result * PRIME + ($pid == null ? 43 : $pid.hashCode());
        return result;
    }

    public String toString() {
        return "TeamUser(tid=" + this.getTid() + ", pid=" + this.getPid() + ")";
    }

    public static class TeamUserBuilder {
        private Integer tid;
        private Integer pid;

        TeamUserBuilder() {
        }

        public TeamUser.TeamUserBuilder tid(Integer tid) {
            this.tid = tid;
            return this;
        }

        public TeamUser.TeamUserBuilder pid(Integer pid) {
            this.pid = pid;
            return this;
        }

        public TeamUser build() {
            return new TeamUser(tid, pid);
        }

        public String toString() {
            return "TeamUser.TeamUserBuilder(tid=" + this.tid + ", pid=" + this.pid + ")";
        }
    }
}
